﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master"
    Inherits="System.Web.Mvc.ViewPage" %>

<%@ Import Namespace="System.ServiceModel.Syndication" %>


<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Welcome
</asp:Content>

<asp:Content ID="Content10" ContentPlaceHolderID="NewsContent" runat="server">
    <% foreach (var item in ViewBag.feeds)
       {
           if (item.rssFeed != null)
               Response.Write(HtmlHelpers.RSSFeed(item.NoticiaNombre, item.cantVisualizar, item.showDesc, item.tagBusqueda, item.rssFeed.Items));
           else
               Response.Write("The service is not available.");
       } %>
</asp:Content>

<asp:Content ID="Content11" ContentPlaceHolderID="ImageContent" runat="server">
    <% if ("Html5".Equals(ViewData["imageGallery"].ToString().Trim()))
       { %>
        <%= Html.ImageHtml5Resources(ViewData["imageHeigth"].ToString().AsInt(), ViewData["imageWidth"].ToString().AsInt())%>
        <% string img1 = Html.SiteImages(ViewData["idSitio"].ToString().AsInt());
           string img2 = Html.getImageFlickrSearch(ViewData["imagekey"].ToString(), ViewData["imageSecret"].ToString(), ViewData["imageTag"].ToString(), ViewData["imageCant"].ToString().AsInt());
           if ((img1 != "") || (img2 != ""))
           {%>
                <sector class="galC">
                <div class="pics">   
                    <%= img1%>          
                    <%= img2%>          
                </div>   
                <div class="pic-nav">
                    <a href="#" id="prev" width="83" height="45"></a>
                    <a href="#" id="next" width="83" height="45"></a>
                </div>

                </sector>
                <%= Html.ImageHtml5Script()%>
        <% }
           else
           {%>
                <p> There are no image that match the search tag. </p>
        <% }
       }
       else
           if (ViewData["imageGallery"].ToString() != "")
           {%>
            <% string img1 = Html.SiteImages(ViewData["idSitio"].ToString().AsInt());
               string img2 = Html.getImageFlickrSearch(ViewData["imagekey"].ToString(), ViewData["imageSecret"].ToString(), ViewData["imageTag"].ToString(), ViewData["imageCant"].ToString().AsInt());
               if ((img1 != "") || (img2 != ""))
               {%>       
                    <%= Html.ImageResources(ViewData["imageColor"].ToString())%>
                    <div id="gallery">
                        <%= img1%>
                        <%= img2%>
                    </div>
                    <%= Html.ImageScript(ViewData["imageHeigth"].ToString().AsInt(), ViewData["imageWidth"].ToString().AsInt())%>
            <%}           
              else
               {%>
                    <p> There are no image that match the search tag. </p>
            <% }
        } %>
</asp:Content>
<asp:Content ID="Content12" ContentPlaceHolderID="VideContent" runat="server">
    <% if (ViewData["videoTipo"].ToString() == "Small")
       { %>
    <%= Html.VideoResources(ViewData["videoKey"].ToString())%>
    <%= Html.VideoScript(ViewData["videoTag"].ToString(), (ViewData["videoSize"].ToString().AsInt() == 8))%>
    <div id="videosc">
    </div>
    <%}
       else if (ViewData["videoTipo"].ToString() == "Html5")
       { %>
       <%= Html.VideoSearch(ViewData["videoTag"].ToString(), ViewData["videoSize"].ToString().AsInt(), ViewData["videoHeigth"].ToString().AsInt(), ViewData["videoWidth"].ToString().AsInt())%>
       
    <%} %>
</asp:Content>
<%--
<asp:Content ID="Content13" ContentPlaceHolderID="TweetThis" runat="server">
 <%=ASP.TwitterGoodies.TweetButton(TwitterGoodies.DataCount.Horizontal, "Tweet", "http://urldelsitio", TwitterGoodies.Languages.English,"nombredelsitio")%>
</asp:Content>
--%>


<script runat="server">
    protected void Page_PreInit(Object sender, EventArgs e)
    {
        this.Master.MasterPageFile = Url.Content(ViewBag.Site.dir_master);
    }
</script>

